package com.changgou.user.dao;
import com.changgou.user.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

/****
 * @Author:黑马训练营
 * @Description:User的Dao
 * @Date 未来/6/14 0:12
 *****/
public interface UserMapper extends Mapper<User> {
    /***
     * 增加用户积分
     * @param username
     * @param scores
     */
    @Update("update tb_user set points=points+#{scores} where username=#{username}")
    void addUserPoints(@Param("username") String username,@Param("scores") Integer scores);
}
